﻿using System;
using System.Text;
using System.Net;

using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Threading;
using System.Windows.Forms;

namespace ServerNetwork
{
    public class Server : Form
    {
        private Button btnStart;
        private Label lblTitle;
        static string output = "";

        public Server()
        {
            InitializeComponent();
        }

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Server());
        }

        private void InitializeComponent()
        {
            this.btnStart = new System.Windows.Forms.Button();
            this.lblTitle = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // btnStart
            // 
            this.btnStart.Location = new System.Drawing.Point(197, 227);
            this.btnStart.Name = "btnStart";
            this.btnStart.Size = new System.Drawing.Size(75, 23);
            this.btnStart.TabIndex = 0;
            this.btnStart.Text = "Start";
            this.btnStart.UseVisualStyleBackColor = true;
            this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
            // 
            // lblTitle
            // 
            this.lblTitle.AutoSize = true;
            this.lblTitle.Location = new System.Drawing.Point(12, 9);
            this.lblTitle.Name = "lblTitle";
            this.lblTitle.Size = new System.Drawing.Size(38, 13);
            this.lblTitle.TabIndex = 1;
            this.lblTitle.Text = "Server";
            // 
            // Server
            // 
            this.ClientSize = new System.Drawing.Size(284, 262);
            this.Controls.Add(this.lblTitle);
            this.Controls.Add(this.btnStart);
            this.Name = "Server";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            Protocol.StartServer();
        }
    }
}
